home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Soundblaster Multimedia Experience 3
/
The Soundblaster Multimedia Experience Vol 3.iso
/
tools
/
smix12
/
mix.doc
< prev
next >
Wrap
Text File
|
1994-03-13
|
31KB
|
729 lines
Superiority MIX Audio Player v1.2
Copyright (C) 1994 by Avery Pennarun
For Superiority Complex
What's a MIX?
-------------
I'd like to tell you that Superiority MIX is an entirely new concept, but,
well, it's not. MIX is a program designed to play Amiga-format .MOD music
files on a PC. Of course, this has been done a million (or at least five)
times before... but you have to start somewhere.
USELESS TRIVIA: Superiority MIX is actually the name of the audio-playing
library I'm working on. This program is actually just a "wide beta" of
the MIXLIB which we (Superiority Complex) will be and have been using in
our productions.
Even though I branded MIX a "test" right from the start, I sort of lost
control halfway through and added a user interface, including:
- "Realistic" (not "real" - actually, quite fake!) volume bars;
- Sample-tracker that displays all sample names, which voices are playing
which samples, which samples actually CAN be played, and which samples
HAVE been played;
- Time, memory usage, note-tracker, speed... and other displays
- Advanced shell-to-DOS that works with "most" programs (all that we
tested, in fact, although we didn't try very hard to find a "bad" one);
- Control over MOD playing, including speed, volume, note-position... and
other controls.
USELESS TRIVIA: I wrote the original user interface all in one day. It then
took me about a week to make it work RIGHT.
MIX supports a number of sound cards. Unlike many MOD players, I didn't go
crazy and support every sound card I could find. (that comes later!) Instead,
I supported Sound Blaster, which most are compatible with, and then added
GRAVIS ULTRASOUND, COVOX SOUND MASTER II, and HOMEMADE DAC support. Other
cards that are Sound Blaster compatible can just use the "Sound Blaster"
setting. I left out other cards, like Sound Blaster Pro because I just
couldn't find any information on programming them (still looking - hint,
hint) and it would be incredibly hard to test since I don't have one.
USELESS TRIVIA: All the supported cards are currently operated in their
respective NON-DMA modes. (Why? Because I couldn't find sufficient
information, of course - hint, hint) However, in the case of the GRAVIS
ULTRASOUND, it takes virtually no processor time to handle the audio
anyway. Summary: make my job easier! GET A GUS!
MIX does NOT support the internal speaker (I have an idea that could allow
this in the future) or the Ad Lib card. Neither of these support "easy"
digital audio, so I didn't bother with them in this version.
WARNING: If your GRAVIS ULTRASOUND has not been upgraded to 1 meg, very long
MODs will not play correctly.
Well, on with the story.
Page 2
Licence Agreement and Unlimited Warrantee
-----------------------------------------
Boring Version
--------------
NOTE: This licence, dated March 1994, supersedes all previous licence
agreements applying to this software. It applies ONLY to this version
1.2 of Superiority MIX.
This software is provided on an as-is basis. The author, Avery Pennarun,
will not be responsible for any damages that may result from the use or
inability to use this software. The author specifically disclaims all
warranties, expressed or implied, regarding this software.
While we encourage free distribution, you are not permitted to redistribute
all or any part of this software in a modified or incomplete form. If at all
possible, MIX should be distributed in its original compressed archive. If
a new archive or distribution disk must be created, it should have the same
name as the original and MUST CONTAIN all files listed under the section of
this document entitled "File List."
This version of MIX is FREEWARE. This means that it is free. You may use,
distribute, copy, archive, and enjoy this program as long as you like, and we
encourage you to do so. However, YOU MAY NOT SELL THIS SOFTWARE! The only
charge that may be applied to the distribution of MIX is a
distribution/copying charge of less than five Canadian dollars. It must be
made clear that this is a payment to the distributor, NOT a registration with
the author.
FREEWARE is not the same as Public Domain software. The author reserves his
copyright to MIX. Modifying, reverse engineering, or decompiling MIX or any
of its included files is expressly prohibited.
This agreement shall be governed in accordance to the laws of Ontario,
Canada.
Not-So-Boring Version
---------------------
Do what you want with this software (within reasonable and legal range - such
acts as manslaughter are often considered felonies, and can lead to a not-so-
happy situation) but don't sue me for it.
No limitations are made regarding the warrantee of this product. Why?
Because THERE IS NO WARRANTEE. Superiority MIX, at least this version, is
FREE SOFTWARE, and we take no responsibility for it or anything that may
happen because of it. Not that anything SHOULD happen, but heck...
Page 3
File List
---------
The following files were originally included in the distribution archive
and/or on the distribution disk. A legal copy of MIX MUST include these
files:
MIX.EXE - The main program
MIX.DOC - That's this. This is that. And that's that.
REVHIST.DOC - MIX revision history since v1.0. (list of changes)
MOD_INFO.TXT - Handy-dandy programmers' info for MODs.
SCS.NFO - Information about Superiority Complex. Read this!
FILE_ID.DIZ - 10-line description for BBS's
DESC.SDI - 1-line description
Getting Started
---------------
This tutorial will get you started playing MOD files with Superiority MIX.
Most people can figure it out anyway, but PLEASE read this for important
information regarding MIX.
WARNING: If you have EMM386, QEMM, 386MAX, or another memory manager (NOT
including HIMEM), you should disable it when you use MIX. They
slow down the program because they use your processor's protected
mode, resulting in reduced sound quality. If you have DOS 6, just
use the multi-boot configuration to remove your memory manager when
you need to. (See your DOS manual) If you have a fast computer
you might experiment with leaving your memory manager alone.
Users of the 8086 and 8088 processors: I have good news and bad news. The
good news is that your processor doesn't even SUPPORT protected mode, so you
don't have to worry about memory managers. The bad news is that they don't
support MIX, either. It's time to either upgrade your computer or delete
MIX.
USELESS TRIVIA: The GRAVIS ULTRASOUND play mode doesn't particularly care
whether you have a memory manager loaded because it does all the
processing internally anyway. Also, once I figure out DMA, the Sound
Blaster and Sound Master II sound cards will work the same way. DigiLen
100 doesn't support DMA.
STEP 1: Pick a MOD. Previous versions of MIX were distributed with
VOCIF.MOD, but this version no longer is (we thought you might be
tired of it by now). Pretend you're using XMASSONG.MOD for this
tutorial. (Why? Because it's one of the soundtrack MODs from our
Christmas '93 demo, and we released it at the same time as MIX 1.2!
You DID download XMASMODS.ZIP, right? So what if it's March!)
Page 4
STEP 2: Run MIX. Another easy one. MIX v1.2 currently supports only two
command-line options (and you don't NEED to use them). It works
like this:
MIX xmassong.mod
USELESS TRIVIA: Advanced users can use wildcards or multiple MOD
names on the same line. Separate multiple names with spaces.
MIX sports two command line options:
/D - Disable detect. MIX will ask for your sound card type
and address instead of trying to detect it. STEP 3
demonstrates a use for this.
/S - Select sample rate. The REALLY lazy people who don't
want to select a sampling rate every time they start, can
use this option on the command line, ie: /S15000 for a
15KHz sampling rate.
USELESS TRIVIA: You can select ANY sampling rate with
this switch, including ones that aren't in the
menu. For example, if 15000 Hz is too fast for
your computer, but 14999 Hz works, you can use this
switch. Unfortunately, this will never happen.
STEP 3: Watch as MIX detects your sound card. The first time in MIX, watch
the message to make sure that the correct card and address are
detected (although you'll notice soon enough if they aren't, since
sound won't play). Detection should take no more than a couple
seconds, and it has never taken that long. If you have a DigiLen
100 or a DAC on LPTx, MIX will not be able to detect your card.
Select DAC on LPTx from the resulting window. If it hangs your
computer or detects the wrong card... there ARE a few ways around
it:
- Leave caution to the wind, reboot, and try again. This
usually doesn't work, but it actually does sometimes.
- GUS or Sound Blaster users: set the appropriate environment
variable. (ULTRASND or BLASTER) Your manual should explain
how to do this. In fact, the install program for your
hardware should have created these in the first place.
- Try running MIX with the /D (disable detect) parameter. This
will force MIX to ask you for your sound card type and
address. Example:
MIX xmassong /d
Page 5
STEP 4: Choose a sampling rate. It's a long list, but I've recommended
certain sampling rates for certain processors. Try starting with
that, and then increasing the sampling rate within the program
(using the [R] key) until the display starts to slow down.
USELESS TRIVIA: The sound has pretty much reached maximum quality
at about 25 KHz. (DNA made me add in the others because he has
a big hyperactive 486 - he can't tell the difference either
but is sure there must be one) Because the GRAVIS ULTRASOUND
mixes sound internally, MIX bypasses this step.
STEP 5: Look, listen, learn. If you're hearing beautiful music through
your sound card, you've succeeded and can skip to step 6. If the
sound or display is too slow, choose a lower sampling rate with the
[R] key. (you may need to reboot if the sampling rate is WAY too
high and your display is frozen) GUS users: ignore all notes
regarding sampling rate.
STEP 6: Try a higher sampling rate and return to step 5. Sampling rates
are a give and take system; you can use the very low 5 KHz on any
computer, and the sound will be correct. However, it will also be
very low-quality. As you increase the sampling rate, the sound
quality improves, but the display begins to slow down. The higher
the sampling rate, the more processor time that is devoted to
music.
USELESS TRIVIA: Unlike many other MOD players, MIX doesn't totally
screw up your system clock while playing a song. However,
there's a very good chance that it won't run at EXACTLY the
same speed as normal, since MIX has to increase your clock
speed "invisibly" and then compensate. Don't worry, losing a
few seconds here and there is a lot better than completely
stopping time.
STEP 7: Experiment with MIX's controls and make the song sound nothing like
it really should. The controls are listed later in this DOC and a
quick-list of them is available if you press F1 from within MIX.
STEP 8: Enjoy this incredible experience and have a NICE day.
Page 6
Using the User Interface
------------------------
+------------------------- (1) SongTitle ----------------------------+
| | |
| (2) VoiceTracker | (3) SongTracker |
| | |
|-----------------------------------------------+--------------------|
| | |
| | (4) MemTracker |
| | |
| (6) SampleTracker |--------------------|
| | |
| | (5) TimeTracker |
| | |
+------------------------Superiority MIX v1.2------------------------+
The above diagram is a (rather cheap) rendition of what an actual MOD playing
screen looks like. Each area works as follows:
(1) SongTitle Displays the filename and title of the song.
(2) VoiceTracker Displays the sample (instrument) being played and the
volume level for each of the four voices.
USELESS TRIVIA: No, we can't read the numbers in the
volume display either, but they look pretty. The
volume bars (next to the numbers) are a bit more
informative.
(3) SongTracker Displays information about the player:
POSITION The current and maximum pattern-positions in the song. A MOD
consists of up to 128 positions that play in numerical order.
When you get to the last position, most MODs will end. Some
will loop back to a previous position and play forever unless
you use the [L]oopmode command.
PATTERN The current/maximum pattern in the song. A MOD can contain up
to 64 unique patterns. Each pattern-position (above) selects
one pattern to play. Particularly repetitive songs (like
VOCIF) will use the same pattern in more than one pattern-
position to save space.
NOTE The current/maximum note number in the current pattern. There
are always 64 notes in a pattern, but certain MOD commands can
end a pattern prematurely.
Page 7
SPEED The speed at which a song plays. (tempo)
USELESS TRIVIA: The songspeed is actually expressed in ticks
per note. One tick is 1/50th of a second. So, a song
playing at speed 3 would take 3/50ths or 0.06 seconds per
note.
VOLUME Hint: It changes when you use the set volume keys (+,-).
USELESS TRIVIA: The volume level, while displayed in percent,
is really a number from 0-64. When you adjust the
volume, you are adding or subtracting 1/64th, not 1%.
This is why the volume control sometimes adjusts the
display by 2% and sometimes by 1%.
SAMPRATE The current song sampling rate. See "Getting Started" above
for more information on choosing a sampling rate. In GUS
mode, the sampling rate shows "UltraHi" because of the card's
hardware mixer that seems to have indefinite quality.
USELESS TRIVIA: The GRAVIS ULTRASOUND's internal sound mixer
theoretically can increase the quality of the sample so
that is sounds better than playing one sample at a time
on Sound Blaster-like systems. GET A GUS!
LOOPMODE Controls how long a song will play. There are three different
loopmodes, selected with the [L]oopmode command:
NORMAL Plays a MOD like it was originally designed.
If it wants to loop itself permanently, it
can. Otherwise, it will end.
ALWAYS Replay a MOD from the beginning if it ends.
FADE Fade out and terminate MODs that try to loop
themselves.
(4) MemTracker
Displays information about system memory:
TOTAL The amount of memory available after MIX loaded but before the
MOD was loaded. This shows you how much memory is available
for playing MODs.
USED The amount of memory being used by the current MOD. This
includes buffers needed for mixing voices on non-GUS cards.
USELESS TRIVIA: The Gravis Ultrasound takes a WHOLE LOT less
memory when playing MODs since it requires no mixing
buffers and all samples are loaded into the card's
memory. GET A GUS!
Page 8
FREE The amount of memory left at the moment. This is useful for
determining the kind of performance you'll get if you shell to
DOS, or how close you are to running out. (i.e. if you only
have 50k free, don't try to play a MOD 200k longer than this
one or MIX will give you an error)
(5) TimeTracker
Displays information about the play-time of the song:
NOW The length of time (in minutes:seconds) that the current song
has been playing.
ESTIMATE The length of time that MIX expects a song to play. Note that
looping songs will play forever: in this case, MIX will
display "No End." ESTIMATE is simply for your information, and
is an "educated guess" - it's seldom exactly right, but
usually close.
(6) SampleTracker
Displays information about the different samples in a song. A MOD can
contain up to 31 different samples, each up to 128k long.
USELESS TRIVIA: MIX will only load up to 64k of any sample. This
screws up the playing of U4IA.MOD, and a couple of other songs. We
will fix this in the future...
The entry for each sample is as follows:
1 o SampleName
The "1" is actually a: blank, "1," "2," "3," or "4," depending which
voice is playing that sample. If more than one voice is using that
sample, an "M" is shown.
The "o" is either a blank, a dot, or a block. A blank indicates that
there is no sample in that position (a sample may be loaded and have a
name, etc, but it has no corresponding sound effect in the MOD). I dot
indicates that this sample is playable (contains a sound effect), and a
block indicates that this sample has already been played in the song.
The samplename can be up to 22 characters long and generally gives the
name of the sample.
USELESS TRIVIA: Many MODs use the samplename for another purpose:
greetings. The author renames all or some of the samples to form
a few sentences. XMASSONG.MOD contains an example of this,
although DNA left the actual samples alone and changed only the
unused slots.
Page 9
Controlling The Player
----------------------
As I mentioned above, MIX gives the user a lot of control over its play. The
following keys affect MIX's operation:
F1 Brings up a help window with an abbreviated version of this list.
P Pauses the song. Press a key to resume playing.
1,2,3,4 Toggles the corresponding voice on or off. When a particular voice
is off, it will show "MUTE" in the voicetracker window.
R Change current sampling rate. See "Getting Started."
D Shell to DOS. There are a number of things you should know:
- When shelled to DOS, you can expect MIX to retain from 100k of
memory to a lot more depending which MOD you are playing.
Check the "memory free" meter if you don't know how much is
left. You need about 100k minimum if you want to shell to DOS
at all, and more if you want to do anything useful.
- Don't run any programs that use sound while in the shell.
- Other programs will slow down while playing a MOD because of
the time required to mix voices.
- If a song ends while you are shelled, it will be played again.
(and again and again...)
- Type EXIT at the command prompt to return to MIX.
],[ Adjust speed. ] will turn up the speed value, thereby slowing down
the song. [ will lower the speed value and speed up the song. If
the song adjusts its speed after you've set it, the speed will
become normal again unless you change it. Generally it's not too
useful to play with the song speed, but it can be fun.
<-,-> Position Jump. Use the right and left arrow keys as "fast forward"
and "rewind" respectively.
+,- Turn the master volume up or down respectively. You don't have to
use the SHIFT key to press +, although you can if you want.
N Next song. (also ENTER and SPACE) If you gave wildcards or more
than one name on the command line, this will end the current song
and start the next one. See "Getting Started" for more information
about using the command line. If you only gave one name or this is
the last song, MIX will terminate as if you had pressed ESC.
ESC Exit MIX. This will end the current song and immediately dump you
to DOS. It differs from [N]ext in that ESC will ignore all pending
songs.
Page 10
MOD File Implementation
-----------------------
This section is mostly for the techies out there. If you don't particularly
care how MIX implements MODs, you can safely skip this section.
Voice Mixer
-----------
The mixer routines are entirely Object-Oriented and written using Borland C++
3.1 w/ Application Frameworks. I didn't use the Application Frameworks, for
those who don't find that obvious. The processor-intensive code is written
using inline assembly and/or TASM 3.1, which came with BC++.
The mixer can theoretically handle any number of voices at once, although
MODs are limited to four.
In non-GUS mode, I mix the voices into one of two variable-sized buffers
which are then played by my timer-oriented digital player routines. When one
buffer is entirely played, the digiplayer begins playing the other buffer in
the background and tells the mixer to begin filling the first buffer, and so
it goes, back and forth.
In GUS mode, the operation is similar except there are no buffers at all.
Every 50th of a second (one "tick"), a routine is called that handles special
effects and increments the note counter if necessary. When a new note
begins, the GUS is informed of the new data and handles the rest of the work.
Effects
-------
MIX supports the following special effects:
Porta Up Pattern Break
Porta Down Set Speed
Sample Offset Retrig Note
Volume Slide FineVolume Up
Volume Set FineVolume Down
Position Jump TonePortamento
This should be enough to make most MODs sound OK, unless you're a real
perfectionist (like DNA). I'm already working on adding the other, more
subtle, effects.
Page 11
Known Bugs
----------
What, me? Know about bugs, and not fix them? Don't be silly! Well, okay,
you've convinced me... there ARE a few...
- MIX will only load 64k of each sample, and so songs like U4IA.MOD will
not play properly, if at all. If the list of songs that doesn't work
grows extremely huge, we WILL try to fix this. Until then, it's
probably not worth it.
- "Clicking" in non-GUS mode has been FIXED! We hope. We all have a GUS
now, so it's really hard to tell. LET US KNOW if it still clicks,
PLEASE!
- Sometimes-clicking in GUS mode. We're working on it...
- The GUS inititialization bugs were fixed when I moved to the Gravis SDK.
However, now looping samples do weird things sometimes. It's not my
fault! I swear!
- Many arthropods.
Greetings go to:
----------------
Everyone! - Hi! How are you today? WRITE TO US!
And, more specifically:
Mom & Dad - Hi!
Dave's Mom & Dad - Hi!
Jurgen Huneborn - The first person outside of Thunder Bay to
EVER write to us! And presently, still the
last! Hi, guy!
Future Crew - I've never met you, or talked to you, or
conversed with you, or written to you, or
heard from you, but I like you anyway!
Cascada - Likewise!
Renaissance - Same idea!
GUS Users - Isn't life wonderful?
Advanced Gravis & Forte - Great sound card!! Keep up the terrific
work... (and hey, how bout an SBPro emulator
for all those programs that refuse to support
your card? SBOS is good (sorta) but, well,
it's mono...)
Page 12
Special Thanks To:
------------------
ANDREW SEARS, Whitby, Ontario - Original definition of the MOD file
format for us (see MOD_INFO.TXT for
more information) via North
Amerinet.
DAN LYNES, Thunder Bay, Ontario - Provided information on the 669 file
format, which I have yet to
implement. Keep waiting...
KEVIN SIDLAR, Thunder Bay, Ontario - Reported non-GUS "clicking" bug and
recently sent us information about
the STM file format, which I finally
got around to implementing!
Otto Chrons, Finland Somewhere - Sent us information on the S3M
format, which we also haven't
implemented yet. Thanks! (he also
wrote a mod player: DMP - try that
too)
Jurgen Huneborn, Germany Somewhere - The first person outside of Thunder
Bay to EVER write to us! And
presently, still the last! Hi, guy!
Advanced Gravis & Forte, Canada - You know why... :)
The End
-------
USELESS TRIVIA: Our logo is the pulsating chicken. As you continue with MIX,
always remember: There Had to Be A Chicken Somewhere...
And remember our motto to lead you through life: "If it doesn't have a
chicken on it, it's USELESS!"
USELESS TRIVIA: This is the end of the documentation. Bye.
Siella piti olla kana jossain!! :)
(Fin(n)ish ending... get it? Ha ha ha ha ha)
Page 13